#import "SplitDemoAppDelegate.h"

@implementation SplitDemoAppDelegate

@synthesize window=_window;

@synthesize downloadCache = _downloadCache;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions

{
    
    //初始化ASIDownloadCache缓存对象
    
    ASIDownloadCache *cache =[[ASIDownloadCache alloc]init];
    
    self.downloadCache = cache;
    
    
    
    //路径
    
    NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
    
    NSString *documentDirectory = [paths objectAtIndex:0];
    
    //设置缓存存放路径
    
    [self.downloadCache setStoragePath:[documentDirectorystringByAppendingPathComponent:@"resource"]];
    
    //设置缓存策略
    
    [self.downloadCache setDefaultCachePolicy:ASIOnlyLoadIfNotCachedCachePolicy];
    
    // Override point for customization after application launch.
    
    [self.window makeKeyAndVisible];
    
    return YES;
    
}


- (void)dealloc

{
    
    
}

@end